package cn.jiyun.service.impl;


import cn.jiyun.pojo.Order;
import cn.jiyun.dao.OrderDao;
import cn.jiyun.service.OrderService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class OrderServiceimpl implements OrderService {
    @Resource
    private OrderDao orderDao;
    @Override
    public Order findById(Long id) {
        return orderDao.selectById(id);
    }


    @Override
    public void del(Long userId) {
        orderDao.deletee(userId);
    }

    @Override
    public void add(Order order) {
        orderDao.insert(order);
    }

    @Override
    public void edit(Order order) {
        orderDao.edit(order);
    }

    @Override
    public Page<Order> findAll(Page<Order> page1) {

        return orderDao.selectPage(page1,null);
    }
}
